from django.db import models
from thoughts.models import Thought
from datetime import datetime
from django.contrib.auth.models import User


class Refinement(models.Model):
    thought         = models.ForeignKey(Thought)
    refinement      = models.TextField()
    refinement_date = models.DateTimeField(default = datetime.now)
    accepted_date   = models.DateTimeField()
    status          = models.BooleanField(default = False)
    user            = models.ForeignKey(User)
    

    def __unicode__(self):
        return " %s refines %s" % ( self.user.username, self.thought.title)
  
